Don't propagate GDK_NATIVE_WINDOWS to child processes
authorAlexander Larsson <alexl@redhat.com>
Mon, 31 Aug 2009 07:38:14 +0000 (09:38 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 31 Aug 2009 13:06:01 +0000 (15:06 +0200)
Generally you only need to work around bugs in one specific app, so we
don't want to affect the applications that application will start.
Thus we unset GDK_NATIVE_WINDOWS after reading it.

gdk/gdk.c

index 6b81cc7de29b137f218d05647f807c1a24526bc3..5dd2fae952f8afbceca8b601bf5c0cb584eacbaf 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -206,8 +206,13 @@ gdk_pre_parse_libgtk_only (void)
   }
 #endif /* G_ENABLE_DEBUG */
 
-  if (getenv("GDK_NATIVE_WINDOWS"))
-    _gdk_native_windows = TRUE;
+  if (getenv ("GDK_NATIVE_WINDOWS"))
+    {
+      _gdk_native_windows = TRUE;
+      /* Ensure that this is not propagated
+        to spawned applications */
+      g_unsetenv ("GDK_NATIVE_WINDOWS");
+    }
 
   g_type_init ();